package casa.depesos.app.com.frag;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import casa.depesos.app.com.databinding.FragmentEmptyBinding;
import casa.depesos.app.com.utils.Utils;


public class EmptyFragment extends BaseFragment {

    FragmentEmptyBinding binding;
    String title;

    public EmptyFragment setTitle(String title) {
        this.title = title;
        return this;
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        binding = FragmentEmptyBinding.inflate(inflater, container, false);
        binding.top.top.setPadding(0, Utils.getStatusBarHeight(getActivity()), 0, 0);
        binding.top.title.setText(title);
        binding.top.back.setOnClickListener(view -> getActivity().finish());
        return binding.getRoot();
    }
}
